package idl

type Problem struct {
	Pid      int64 `json:"pid" mapstructure:"pid,omitempty"`
	IsPublic bool  `json:"is_public" mapstructure:"is_public,omitempty"`

	Title                 string `json:"title" binding:"required" mapstructure:"title,omitempty"` //unique,index
	Descript              string `json:"descript" mapstructure:"descript,omitempty"`
	InputDescriptionPath  string `json:"input_description_path" mapstructure:"input_description_path,omitempty"`
	OutputDescriptionPath string `json:"output_description_path" mapstructure:"output_description_path,omitempty"`

	TimeLimit   int `json:"time_limit" mapstructure:"time_limit,omitempty"`     //ms
	MemoryLimit int `json:"memory_limit" mapstructure:"memory_limit,omitempty"` //mb

	Difficulty string `json:"difficulty" mapstructure:"difficulty,omitempty"`

	IsVisible bool `json:"is_visible" mapstructure:"is_visible,omitempty"` //default=true

	Input  string `json:"input" mapstructure:"input,omitempty"`   //input json
	Output string `json:"output" mapstructure:"output,omitempty"` //output json
	Mode   string `json:"mode" mapstructure:"mode,omitempty"`     //IO,ACM

	TestCasePath string `json:"test_case_path" mapstructure:"test_case_path,omitempty"`

	SubmissionNumber int64 `json:"submission_number"  mapstructure:"submission_number,omitempty"` //default=0
	AcceptedNumber   int64 `json:"accepted_number" mapstructure:"accepted_number,omitempty"`      //default=0

	//ProblemTags string `json:"status,omitempty"` //；分割
	CreateBy int64 `json:"create_by" mapstructure:"create_by,omitempty"`

	//SharedSubmissionPath string `json:"shared_submission_path,omitempty"`
}

type ProblemTags struct {
	Tid   int64  `json:"tid" mapstructure:"tid,omitempty"`
	Pid   int64  `json:"pid"`
	Title string `json:"title" mapstructure:"tittle,omitempty"`
}
